	@include("user.head")
	<!-- 公共头部 -->

	<div id="content_person">
	<div class="row">
		<div class="col-xs-3">
			@include("user.uc.navigation")
		</div>
		<div class="col-xs-9">
			<div class="panel panel-default">
			  <div class="panel-heading">
			    <h3 class="panel-title">
			    	项目列表
			    </h3>
			  </div>
			  <div class="panel-body">
			  	<div class="row">
			  		<div class="col-xs-12">
			  			<button class="btn btn-primary pull_right" id="doAdd">
			  				<i class="fa fa-cloud-upload"></i> 发布项目
			  			</button>
			  		</div>
			  	</div>
			  	<table class="table table-striped table-hover text-center table_marginTop">
				  <thead>
				      <td><b>项目名称</b></td>
				      <td><b>投资规模</b></td>
				      <td><b>项目时间</b></td>
				      <td><b>状态</b></td>
			      	  <td><b>操作</b></td>
				  </thead>
				  <tbody>
				  @foreach ($data as $value)
				    <tr>
				      <td><% $value['name'] %></td>
				      <td><% $value['investment_scale'] %></td>
				      <td><%format($value['start_time'], "Y-m-d")%>~<%format($value['end_time'], "Y-m-d")%></td>
				      <td>
				      	@if($value['verify_state'] == 0)
				      	审核中
				      	@elseif($value['verify_state'] == 1)
				      	审核通过
				      	@else
				      	审核未通过
				      	@endif
				      </td>
				      <td>
				      @if($value['verify_state'] == 1)
				      	<button href="#" class="btn btn-primary toDetail" pid="<% $value['id'] %>" title="详情">
				      		<i class="fa fa-eye"></i>
				      	</button>
				      	@endif
				      	<button pid="<% $value['id'] %>" class="btn btn-primary doEdit" title="编辑">
				      		<i class="fa fa-pencil-square-o"></i>
				      	</button>
				      </td>
				    </tr>
				    @endforeach
				  </tbody>
				</table>
				<div class="row text-center">
					@if(isset($presenter) && $presenter)
					<?php echo $presenter->render(); ?>
					@endif
				</div>
			  </div>
			</div>
		</div>
	</div>
	</div>

	<!-- 公共底部 -->
	@include("user.footer")
	@include("user.common")
	<!-- 公共底部 -->

</body>
<script type="text/javascript">
$("#doAdd").click(function(){
	window.location.href="<%url('uc/saver/add_project')%>";
})
$(".doEdit").click(function(){
	var pid = $(this).attr('pid');
	window.location.href="<%url('uc/saver/edit_project?pid=')%>"+pid;
})

$(".toDetail").click(function(){
	var pid = $(this).attr("pid");
	$.get(url + "project_show", {pid : pid}, function (data){
		if(data.success){
			window.location.href="<%url('industry/project/detail?pid=')%>"+pid;
		}else{
			warning("", data.msg);
		}
	})
})



</script>
</html>